<%-- 
    Document   : borrador
    Created on : 27/11/2009, 07:48:40 PM
    Author     : FreddyHIQ
--%>

<%@page contentType="text/html" pageEncoding="ISO-8859-1"%>
<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
<%@ taglib uri="http://myfaces.apache.org/tomahawk" prefix="t" %>
<%@ taglib uri="http://richfaces.org/a4j" prefix="a4j"%>
<%@ taglib uri="http://richfaces.org/rich" prefix="rich"%>
<link href="/general/css/admin_1.css" rel="stylesheet" type="text/css"/>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">

<f:view>
    <t:div>
        <h:form styleClass="fondoFormulariosyPanel">
            <h:panelGrid columns="1" styleClass="rayaForms" width="100%">
                <h:outputLabel  value="Documentos Guardados" />
            </h:panelGrid>
            <h:inputHidden value="#{documentosController.iniBorrador}"/>
            <h:messages id="lblMessages" showDetail="true" errorStyle="color:red;" infoStyle="color:blue;"/>            
            <br><br>
                <rich:dataTable value="#{documentosController.borradores}"
                            var="tdoc" rows="10" reRender="ds" id="simpletable"
                            width="100%" columnsWidth="5%, 15%, 20%, 20%, 10%, 20%, 10%" rowClasses="TableImpar,TablePar">
                <f:facet name="header">
                    <rich:datascroller id="ds" renderIfSinglePage="false"></rich:datascroller>
                </f:facet>
                <rich:column>
                    <f:facet name="header"> <h:outputLabel value="Documento" /></f:facet>
                    <h:outputText value="#{tdoc.fkTdoCodigo.tdoDesc}"></h:outputText>
                </rich:column>                
                <rich:column>
                    <f:facet name="header"> <h:outputLabel value="Fecha de Registro" /></f:facet>
                    <h:outputText value="#{tdoc.docFecha}"></h:outputText>
                </rich:column>
                <rich:column>
                    <f:facet name="header"> <h:outputLabel value="Opciones" /></f:facet>
                    <h:commandLink action="borrador" value="enviar" >
                        <f:setPropertyActionListener target="#{documentosController.editor}" value="#{tdoc.docContenido}" />
                    </h:commandLink>
                </rich:column>
            </rich:dataTable>
        </h:form>
    </t:div>
</f:view>
